import java.util.*;

public class app {
    public static void main(String[] args) throws Exception{
        father f = new father();
        son s = new son();
        HashMap map = new HashMap();
        f.dosth(map);
        f.dosth((Map) map);
        s.dosth(map);
        s.dosth((Map) map);
    }
}

class father {
    Collection dosth(Map map) {
        System.out.println("父类方法");
        return map.values();
    }
}

class son extends father {
    // @Override
    Collection dosth(HashMap map) {
        System.out.println("子类方法");
        return map.values();
    }
}